package com.zrq.jwtdemo.author.dto.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.NonNull;
import lombok.experimental.Tolerate;
import org.hibernate.validator.constraints.NotBlank;

/**
 * @Author:
 * @CreateDate: 2020/12/26
 * @Version: 类说明：请求值
 */
@Data
@Builder
public class UsersRequest {

    @ApiModelProperty(value = "用户名")
    @NotBlank(message = "用户名不能为空")
    private String username;

    @ApiModelProperty(value = "密码")
    @NotBlank(message = "密码不能为空")
    private String password;

    @ApiModelProperty(value = "姓名")
    @NotBlank(message = "姓名不能为空")
    private String name;

    @ApiModelProperty(value = "年龄")
    @NonNull()
    private Integer age;

    @ApiModelProperty(value = "性别")
    @NotBlank(message = "性别不能为空")
    private String sex;

    @Tolerate
    public UsersRequest() {
    }
}
